//
//  UIView+Extension.swift
//  SwiftForAllKnow
//
//  Created by enghou on 16/10/18.
//  Copyright © 2016年 xyxorigation. All rights reserved.
//

import UIKit
extension UIView{
    func top() -> CGFloat {
        return self.frame.origin.y
    }
    
    func bottom() -> CGFloat {
        let bottom = self.frame.origin.y + self.frame.size.height
        return bottom
    }
    
    
    func left() -> CGFloat {
        return self.frame.origin.x
    }
    
    func right() -> CGFloat {
        let right = self.frame.origin.x + self.frame.size.width
        return right
    }
    
    func width() -> CGFloat {
        return self.frame.size.width
    }
    
    func height() -> CGFloat {
        return self.frame.size.height
    }
    
}
